<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	    <link href="<?php bloginfo("template_url")?>/css/layout.css" rel="stylesheet" type="text/css"/> 
	    <?php wp_head(); ?>         
    </head>
    <body>
        <div class="rxs-factory">
            
            <div class="content">
                
                <div class="side-bar">
					<div class="header">
						<a href="/"><img src="<?php bloginfo("template_url")?>/images/logo.jpg" /></a>
					</div>
                    <div class="products box">
                        <h2>PRODUCTOS</h2>
                        <div class="items">
                            <ul>
                                <?php 
                                $args = array(
                                    'type'                     => 'post',
                                    'child_of'                 => get_category_by_slug("indumentaria")->cat_ID,
                                    'orderby'                  => 'name',
                                    'order'                    => 'ASC',
                                    'taxonomy'                 => 'category',
                                    'pad_counts'               => false );
                                $categories=get_categories($args);
                                foreach($categories as $category){	
                                    echo "<li><a href='/category/".$category->name."'><img src='".$category->term_icon."' alt='".$category->name."'/></a></li>";
                                }
                                ?>
                            </ul>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="outlet box">
                            <h2>OUTLET</h2>
                            <ul>
                            <?php 
                            $args = array(
                                'category'        => get_category_by_slug("outlet")->cat_ID,
                                'post_type'       => 'post',
                                'post_status'     => 'publish');
                            $posts_array = get_posts( $args );
                            foreach($posts_array as $post){
                                echo "<li><a href='/".$post->post_name."'>".strtoupper($post->post_title)."</a></li>";
                            }
                            ?>
                            </ul>
                        </div>
                    </div>                    
